<%--
$Id: book-chapter-new.jsp 24 2011-06-17 13:31:30Z feigme $
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %>
<%@ taglib prefix="iary" uri="/WEB-INF/tld/pagination.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><fmt:message key="user.manager"/></title>
<link href="${ctx }/css/admin/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<br/>

<form:form action="${ctx }/admin/bookChapter/create.do" method="post" commandName="chapterCommand">
<input name="bookId" type="hidden" value="${chapterCommand.bookId }"/>
<table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center" border="0">
	<tr>
		<th colspan="2"><fmt:message key="common.create"/><fmt:message key="book.chapter"/></th>
	</tr>
	<tr>
		<td class="usertablerow2"><fmt:message key="book.chapter.name"/><fmt:message key="common.colon"/></td>
		<td class="usertablerow2">
			<input type="text" name="name" value="<c:out value="${chapterCommand.name }"/>"/>
			<span class="error">*</span>
			<form:errors path="name" cssClass="error"/>
		</td>
	</tr>
	<tr>	
		<td class="usertablerow2"><fmt:message key="book.chapter.type"/><fmt:message key="common.colon"/></td>
		<td class="usertablerow2">
			<c:forEach items="${chapterCommand.chapterTypeList}" var="varType" varStatus="index">
				<c:choose>
					<c:when test="${varType == chapterCommand.type}">
						<input checked="checked" type="radio" name="type" value="${varType}"/><fmt:message key="book.chapter.type.${varType}"/> 
					</c:when>
					<c:otherwise>
						<input type="radio" name="type" value="${varType}"/><fmt:message key="book.chapter.type.${varType}"/>
					</c:otherwise>
				</c:choose>
			</c:forEach>
			<span class="error">*</span>
			<form:errors path="type" cssClass="error"/>
		</td>
	</tr>
	<tr>	
		<td class="usertablerow2"><fmt:message key="book.chapter.order"/><fmt:message key="common.colon"/></td>
		<td class="usertablerow2">
			<input type="text" name="order" value="<c:out value="${chapterCommand.order }"/>"/>
			<span class="error">*</span>
			<form:errors path="order" cssClass="error"/>
		</td>
	</tr>
	<tr>
		<td class="usertablerow2"><fmt:message key="book.dir"/><fmt:message key="common.colon"/></td>
		<td class="usertablerow2">
			<input type="text" name="path" value="<c:out value="${chapterCommand.path }"/>" size="11"/>
			<span class="error">*</span>
			<form:errors path="path" cssClass="error"/>
		</td>
	</tr>
	<tr>
		<td class="usertablerow2"><fmt:message key="book.chapter.description"/><fmt:message key="common.colon"/></td>
		<td class="usertablerow2"><textarea cols="40" rows="3" name="description" id="description"><c:out value="${chapterCommand.description }"/></textarea></td>
	</tr>
	<tr>
		<td class="usertablerow2" colspan="2"><input type="submit" value="<fmt:message key="common.submit"/>"/></td>
	</tr>
</table>
</form:form>

<br/>
</body>
</html>